package com.gitee.wsl.struct.tree.sample.binary


/**
 * A [MutableTreeNode] specialization also satisfying the [BinaryTreeNode] interface
 * and providing mutability methods.
 *
 * @param <T> the actual implementation type of this MutableBinaryTreeNode
</T> */
interface MutableBinaryTreeNode<V,T : MutableBinaryTreeNode<V, T>> : BinaryTreeNode<V, T> {
    override var leftNode: T?
    override var rightNode:T?
}

class MutableBinaryTreeNodeImp<V,T : MutableBinaryTreeNode<V, T>>(
    override var data: V,
    override var parent: T? = null,
    override val elementId: Any = Unit,
    override var leftNode: T? = null,
    override var rightNode:T? = null
): MutableBinaryTreeNode<V, T> {
}